home *** CD-ROM | disk | FTP | other *** search
/ Champak 140 / (Vol 140) Sep 19 2011.iso / Games / red_cross_eru.swf / scripts / __Packages / gamebase / road / Road.as < prev    next >
Text File  |  2011-09-19  |  14KB  |  385 lines

  1. §§push(true);
  2. §§push(false);
  3. §§push(false);
  4. §§push(true);
  5. while(true)
  6. {
  7.    if(┬º┬ºpop())
  8.    {
  9.    }
  10.    if(┬º┬ºpop())
  11.    {
  12.    }
  13.    if(┬º┬ºpop())
  14.    {
  15.       break;
  16.    }
  17.    ┬º┬ºpush(true);
  18.    ┬º┬ºpush(false);
  19. }
  20. if(!e.f)
  21. {
  22.    e.f = new g();
  23. }
  24. §§pop();
  25. if(!e.f.h)
  26. {
  27.    e.f.h = new g();
  28. }
  29. §§pop();
  30. if(!e.f.h[§§constant(4)])
  31. {
  32.    f.h[┬º┬ºconstant(4)] extends f[┬º┬ºconstant(6)];
  33.    var _loc2_ = f.h[┬º┬ºconstant(4)] = function()
  34.    {
  35.       super();
  36.       _global.h = this;
  37.       this[┬º┬ºconstant(5)]();
  38.    }[┬º┬ºconstant(7)];
  39.    _loc2_[┬º┬ºconstant(5)] = function()
  40.    {
  41.       this[┬º┬ºconstant(8)] = new ┬º\┬º\┬ºconstant(9)┬º();
  42.       this[┬º┬ºconstant(10)] = new ┬º\┬º\┬ºconstant(9)┬º();
  43.       var _loc4_ = _global[┬º┬ºconstant(11)][┬º┬ºconstant(12)];
  44.       this[┬º┬ºconstant(13)] = _loc4_[┬º┬ºconstant(13)][┬º┬ºconstant(14)]();
  45.       var _loc5_ = _loc4_[┬º┬ºconstant(8)][┬º┬ºconstant(15)];
  46.       var _loc3_ = 0;
  47.       while(_loc3_ < _loc5_)
  48.       {
  49.          this[┬º┬ºconstant(8)][┬º┬ºconstant(17)](new f.h[┬º┬ºconstant(16)](_loc4_[┬º┬ºconstant(8)][_loc3_]));
  50.          _loc3_ = _loc3_ + 1;
  51.       }
  52.       _global[┬º┬ºconstant(19)][┬º┬ºconstant(20)](0,┬º┬ºconstant(18));
  53.       this[┬º┬ºconstant(21)] = 0;
  54.       this[┬º┬ºconstant(22)]();
  55.    };
  56.    _loc2_[┬º┬ºconstant(22)] = function()
  57.    {
  58.       this[┬º┬ºconstant(10)][┬º┬ºconstant(17)](new f.h[┬º┬ºconstant(23)](_global[┬º┬ºconstant(11)][┬º┬ºconstant(12)][┬º┬ºconstant(10)][this[┬º┬ºconstant(21)]]));
  59.    };
  60.    _loc2_[┬º┬ºconstant(24)] = function()
  61.    {
  62.       var _loc3_ = _global[┬º┬ºconstant(11)][┬º┬ºconstant(12)][┬º┬ºconstant(10)][┬º┬ºconstant(15)] - 1;
  63.       var _loc4_ = eval(┬º┬ºconstant(25))[┬º┬ºconstant(26)](25 * this[┬º┬ºconstant(21)] / _loc3_);
  64.       _global[┬º┬ºconstant(19)][┬º┬ºconstant(20)](_loc4_,┬º┬ºconstant(18));
  65.       if(this[┬º┬ºconstant(21)] == _loc3_)
  66.       {
  67.          f[┬º┬ºconstant(28)][┬º┬ºconstant(29)][┬º┬ºconstant(30)](_global[┬º┬ºconstant(12)],_global[┬º┬ºconstant(12)][┬º┬ºconstant(27)],10);
  68.       }
  69.       else
  70.       {
  71.          this[┬º┬ºconstant(21)] = this[┬º┬ºconstant(21)] + 1;
  72.          f[┬º┬ºconstant(28)][┬º┬ºconstant(29)][┬º┬ºconstant(30)](this,this[┬º┬ºconstant(22)],10);
  73.       }
  74.    };
  75.    _loc2_[┬º┬ºconstant(31)] = function(cid)
  76.    {
  77.       var _loc3_ = this[┬º┬ºconstant(8)][┬º┬ºconstant(15)];
  78.       var _loc2_ = 0;
  79.       while(_loc2_ < _loc3_)
  80.       {
  81.          if(this[┬º┬ºconstant(8)][_loc2_][┬º┬ºconstant(32)] == cid)
  82.          {
  83.             return this[┬º┬ºconstant(8)][_loc2_];
  84.          }
  85.          _loc2_ = _loc2_ + 1;
  86.       }
  87.    };
  88.    _loc2_[┬º┬ºconstant(33)] = function(sid)
  89.    {
  90.       var _loc3_ = this[┬º┬ºconstant(10)][┬º┬ºconstant(15)];
  91.       var _loc2_ = 0;
  92.       while(_loc2_ < _loc3_)
  93.       {
  94.          if(this[┬º┬ºconstant(10)][_loc2_][┬º┬ºconstant(32)] == sid)
  95.          {
  96.             return this[┬º┬ºconstant(10)][_loc2_];
  97.          }
  98.          _loc2_ = _loc2_ + 1;
  99.       }
  100.    };
  101.    _loc2_[┬º┬ºconstant(34)] = function(car, pstart, pend, checkVehicles)
  102.    {
  103.       var _loc6_ = new ┬º\┬º\┬ºconstant(9)┬º();
  104.       var _loc14_ = undefined;
  105.       var _loc11_ = this[┬º┬ºconstant(35)](pstart,pend,checkVehicles,car);
  106.       if(_loc11_[┬º┬ºconstant(36)])
  107.       {
  108.          if(f[┬º┬ºconstant(37)][┬º┬ºconstant(38)][┬º┬ºconstant(39)](car,_loc11_))
  109.          {
  110.             _loc11_[┬º┬ºconstant(40)] = car[┬º┬ºconstant(41)];
  111.             return _loc11_;
  112.          }
  113.       }
  114.       var _loc13_ = f.h[┬º┬ºconstant(42)][┬º┬ºconstant(43)](pstart,car);
  115.       var _loc12_ = f.h[┬º┬ºconstant(42)][┬º┬ºconstant(43)](pend,car);
  116.       var _loc5_ = this[┬º┬ºconstant(44)](_loc13_,_loc12_,checkVehicles,car);
  117.       var _loc8_ = _loc5_[┬º┬ºconstant(15)];
  118.       var _loc2_ = 0;
  119.       while(_loc2_ < _loc8_)
  120.       {
  121.          var _loc4_ = _loc5_[_loc2_];
  122.          var _loc3_ = f.h[┬º┬ºconstant(42)][┬º┬ºconstant(45)](_loc4_[┬º┬ºconstant(36)],pstart,pend);
  123.          _loc6_[┬º┬ºconstant(17)](_loc3_);
  124.          _loc2_ = _loc2_ + 1;
  125.       }
  126.       _loc14_ = this[┬º┬ºconstant(46)](car,_loc6_);
  127.       return _loc14_;
  128.    };
  129.    _loc2_[┬º┬ºconstant(46)] = function(car, paths)
  130.    {
  131.       paths[┬º┬ºconstant(48)](┬º┬ºconstant(15),eval(┬º┬ºconstant(9))[┬º┬ºconstant(47)]);
  132.       var _loc3_ = undefined;
  133.       var _loc5_ = paths[┬º┬ºconstant(15)];
  134.       var _loc2_ = 0;
  135.       while(_loc2_ < _loc5_)
  136.       {
  137.          var _loc1_ = paths[_loc2_];
  138.          if(!(_loc3_ != undefined && _loc1_[┬º┬ºconstant(15)] == _loc3_))
  139.          {
  140.             _loc3_ = _loc1_[┬º┬ºconstant(15)];
  141.             if(f[┬º┬ºconstant(37)][┬º┬ºconstant(38)][┬º┬ºconstant(39)](car,_loc1_))
  142.             {
  143.                _loc1_[┬º┬ºconstant(40)] = car[┬º┬ºconstant(41)];
  144.                return _loc1_;
  145.             }
  146.          }
  147.          _loc2_ = _loc2_ + 1;
  148.       }
  149.       return null;
  150.    };
  151.    _loc2_[┬º┬ºconstant(44)] = function(p1, p2, checkVehicles, sourceCar)
  152.    {
  153.       var _loc5_ = new ┬º\┬º\┬ºconstant(9)┬º();
  154.       if(p1 == undefined || p2 == undefined)
  155.       {
  156.          return undefined;
  157.       }
  158.       if(p1 instanceof f.h[┬º┬ºconstant(16)])
  159.       {
  160.          var _loc3_ = p1[┬º┬ºconstant(50)](p2,new ┬º\┬º\┬ºconstant(9)┬º(),{┬º\┬º\┬ºconstant(49)┬º:sourceCar});
  161.          if(_loc3_)
  162.          {
  163.             _loc5_[┬º┬ºconstant(17)](_loc3_);
  164.          }
  165.       }
  166.       else
  167.       {
  168.          var _loc2_ = this[┬º┬ºconstant(33)](p1[┬º┬ºconstant(51)]);
  169.          var _loc7_ = this[┬º┬ºconstant(33)](p2[┬º┬ºconstant(51)]);
  170.          var _loc8_ = true;
  171.          if(_loc2_ == _loc7_)
  172.          {
  173.             _loc3_ = _loc2_[┬º┬ºconstant(52)](p1,p2);
  174.             if(f[┬º┬ºconstant(37)][┬º┬ºconstant(38)][┬º┬ºconstant(39)](sourceCar,_loc3_))
  175.             {
  176.                _loc5_[┬º┬ºconstant(17)](_loc3_);
  177.                _loc8_ = false;
  178.             }
  179.          }
  180.          _loc3_ = _loc2_[┬º┬ºconstant(56)][┬º┬ºconstant(50)](p2,new ┬º\┬º\┬ºconstant(9)┬º(),{┬º\┬º\┬ºconstant(49)┬º:sourceCar,┬º\┬º\┬ºconstant(53)┬º:_loc2_,┬º\┬º\┬ºconstant(54)┬º:p1,┬º\┬º\┬ºconstant(55)┬º:_loc2_[┬º┬ºconstant(56)]});
  181.          if(_loc3_)
  182.          {
  183.             _loc5_[┬º┬ºconstant(17)]({┬º\┬º\┬ºconstant(36)┬º:_loc3_[┬º┬ºconstant(36)]});
  184.          }
  185.          if(_loc2_[┬º┬ºconstant(57)])
  186.          {
  187.             _loc3_ = _loc2_[┬º┬ºconstant(57)][┬º┬ºconstant(50)](p2,new ┬º\┬º\┬ºconstant(9)┬º(),{┬º\┬º\┬ºconstant(49)┬º:sourceCar,┬º\┬º\┬ºconstant(53)┬º:_loc2_,┬º\┬º\┬ºconstant(54)┬º:p1,┬º\┬º\┬ºconstant(55)┬º:_loc2_[┬º┬ºconstant(57)]});
  188.             if(_loc3_)
  189.             {
  190.                _loc5_[┬º┬ºconstant(17)]({┬º\┬º\┬ºconstant(36)┬º:_loc3_[┬º┬ºconstant(36)]});
  191.             }
  192.          }
  193.       }
  194.       return _loc5_;
  195.    };
  196.    _loc2_[┬º┬ºconstant(58)] = function(path, clr)
  197.    {
  198.       var _loc6_ = path[┬º┬ºconstant(36)][┬º┬ºconstant(15)];
  199.       var _loc4_ = 0;
  200.       while(_loc4_ < _loc6_)
  201.       {
  202.          var _loc2_ = path[┬º┬ºconstant(36)][_loc4_];
  203.          if(clr == undefined)
  204.          {
  205.             clr = _loc2_[┬º┬ºconstant(59)];
  206.             if(_loc2_[┬º┬ºconstant(59)] == undefined)
  207.             {
  208.                clr = 16777215;
  209.             }
  210.          }
  211.          var _loc3_ = !(_loc2_ instanceof f.h[┬º┬ºconstant(16)]) ? 6 : 8;
  212.          f[┬º┬ºconstant(28)][┬º┬ºconstant(63)][┬º┬ºconstant(64)](_global[┬º┬ºconstant(12)][┬º┬ºconstant(62)],_loc2_[┬º┬ºconstant(61)] - _loc3_ / 2,_loc2_[┬º┬ºconstant(60)] - _loc3_ / 2,_loc3_,_loc3_,clr);
  213.          _loc4_ = _loc4_ + 1;
  214.       }
  215.    };
  216.    _loc2_[┬º┬ºconstant(35)] = function(p1, p2, checkVehicles, car)
  217.    {
  218.       var _loc4_ = false;
  219.       var _loc5_ = 0;
  220.       var _loc6_ = undefined;
  221.       var _loc7_ = f.h[┬º┬ºconstant(42)][┬º┬ºconstant(65)](p1,p2,15,30);
  222.       var _loc8_ = _loc7_[┬º┬ºconstant(15)];
  223.       var _loc3_ = 0;
  224.       while(_loc3_ < _loc8_)
  225.       {
  226.          var _loc2_ = _loc7_[_loc3_];
  227.          if(_loc2_[┬º┬ºconstant(59)] == _global[┬º┬ºconstant(12)][┬º┬ºconstant(66)] || _loc2_[┬º┬ºconstant(59)] == _global[┬º┬ºconstant(12)][┬º┬ºconstant(67)])
  228.          {
  229.             if(!_loc4_)
  230.             {
  231.                _loc5_ = _loc5_ + 1;
  232.             }
  233.             _loc4_ = true;
  234.          }
  235.          else
  236.          {
  237.             _loc4_ = false;
  238.          }
  239.          if(_loc2_[┬º┬ºconstant(59)] == _global[┬º┬ºconstant(12)][┬º┬ºconstant(68)])
  240.          {
  241.             _loc6_ = true;
  242.             break;
  243.          }
  244.          _loc3_ = _loc3_ + 1;
  245.       }
  246.       if(_loc6_ && _loc5_ == 0)
  247.       {
  248.          return null;
  249.       }
  250.       if(!_loc6_ && _loc5_ < 2)
  251.       {
  252.          var _loc9_ = {┬º\┬º\┬ºconstant(61)┬º:p2[┬º┬ºconstant(61)],┬º\┬º\┬ºconstant(60)┬º:p2[┬º┬ºconstant(60)],┬º\┬º\┬ºconstant(51)┬º:p2[┬º┬ºconstant(51)]};
  253.          _loc9_[┬º┬ºconstant(69)] = _global[┬º┬ºconstant(12)][┬º┬ºconstant(70)](_loc9_[┬º┬ºconstant(61)],_loc9_[┬º┬ºconstant(60)]);
  254.          f.h[┬º┬ºconstant(42)][┬º┬ºconstant(71)](_loc9_);
  255.          return {┬º\┬º\┬ºconstant(36)┬º:[p2],┬º\┬º\┬ºconstant(15)┬º:f.h[┬º┬ºconstant(42)][┬º┬ºconstant(72)]([p1,p2])};
  256.       }
  257.       return null;
  258.    };
  259.    _loc2_[┬º┬ºconstant(73)] = function(obj, arr)
  260.    {
  261.       var _loc2_ = arr[┬º┬ºconstant(15)];
  262.       var _loc1_ = 0;
  263.       while(_loc1_ < _loc2_)
  264.       {
  265.          if(arr[_loc1_] == obj)
  266.          {
  267.             return true;
  268.          }
  269.          _loc1_ = _loc1_ + 1;
  270.       }
  271.       return false;
  272.    };
  273.    _loc2_[┬º┬ºconstant(74)] = function()
  274.    {
  275.       if(this[┬º┬ºconstant(75)] == undefined)
  276.       {
  277.          this[┬º┬ºconstant(75)] = 0;
  278.       }
  279.       var _loc3_ = _global[┬º┬ºconstant(76)][┬º┬ºconstant(77) + _global[┬º┬ºconstant(76)][┬º┬ºconstant(78)][this[┬º┬ºconstant(75)]]];
  280.       _loc3_[┬º┬ºconstant(79)]();
  281.    };
  282.    _loc2_[┬º┬ºconstant(80)] = function()
  283.    {
  284.       var _loc3_ = _global[┬º┬ºconstant(76)][┬º┬ºconstant(78)][┬º┬ºconstant(15)] - 1;
  285.       var _loc4_ = 75 + eval(┬º┬ºconstant(25))[┬º┬ºconstant(26)](25 * this[┬º┬ºconstant(75)] / _loc3_);
  286.       var _loc5_ = _loc4_ <= 80 ? ┬º┬ºconstant(81) : ┬º┬ºconstant(82);
  287.       _global[┬º┬ºconstant(19)][┬º┬ºconstant(20)](_loc4_,_loc5_);
  288.       if(this[┬º┬ºconstant(75)] == _loc3_)
  289.       {
  290.          f[┬º┬ºconstant(28)][┬º┬ºconstant(29)][┬º┬ºconstant(30)](_global[┬º┬ºconstant(83)],_global[┬º┬ºconstant(83)][┬º┬ºconstant(84)],200);
  291.       }
  292.       else
  293.       {
  294.          this[┬º┬ºconstant(75)] = this[┬º┬ºconstant(75)] + 1;
  295.          f[┬º┬ºconstant(28)][┬º┬ºconstant(29)][┬º┬ºconstant(30)](this,this[┬º┬ºconstant(74)],10);
  296.       }
  297.    };
  298.    _loc2_[┬º┬ºconstant(85)] = function(x, y)
  299.    {
  300.       var _loc5_ = undefined;
  301.       var _loc2_ = 100000;
  302.       var _loc4_ = _global[┬º┬ºconstant(76)][┬º┬ºconstant(86)][┬º┬ºconstant(15)];
  303.       var _loc3_ = 0;
  304.       while(_loc3_ < _loc4_)
  305.       {
  306.          var _loc9_ = _global[┬º┬ºconstant(76)][┬º┬ºconstant(77) + _global[┬º┬ºconstant(76)][┬º┬ºconstant(86)][_loc3_]];
  307.          var _loc7_ = f[┬º┬ºconstant(28)][┬º┬ºconstant(87)][┬º┬ºconstant(88)](x,y,_loc9_[┬º┬ºconstant(61)],_loc9_[┬º┬ºconstant(60)]);
  308.          if(_loc7_ < _loc2_)
  309.          {
  310.             _loc5_ = _loc9_;
  311.             _loc2_ = _loc7_;
  312.          }
  313.          _loc3_ = _loc3_ + 1;
  314.       }
  315.       _loc4_ = _global[┬º┬ºconstant(76)][┬º┬ºconstant(89)][┬º┬ºconstant(15)];
  316.       _loc3_ = 0;
  317.       while(_loc3_ < _loc4_)
  318.       {
  319.          _loc9_ = _global[┬º┬ºconstant(76)][┬º┬ºconstant(77) + _global[┬º┬ºconstant(76)][┬º┬ºconstant(89)][_loc3_]];
  320.          _loc7_ = f[┬º┬ºconstant(28)][┬º┬ºconstant(87)][┬º┬ºconstant(88)](x,y,_loc9_[┬º┬ºconstant(61)],_loc9_[┬º┬ºconstant(60)]);
  321.          if(_loc7_ < _loc2_)
  322.          {
  323.             _loc5_ = _loc9_;
  324.             _loc2_ = _loc7_;
  325.          }
  326.          _loc3_ = _loc3_ + 1;
  327.       }
  328.       _loc4_ = _global[┬º┬ºconstant(76)][┬º┬ºconstant(90)][┬º┬ºconstant(15)];
  329.       _loc3_ = 0;
  330.       while(_loc3_ < _loc4_)
  331.       {
  332.          _loc9_ = _global[┬º┬ºconstant(76)][┬º┬ºconstant(77) + _global[┬º┬ºconstant(76)][┬º┬ºconstant(90)][_loc3_]];
  333.          _loc7_ = f[┬º┬ºconstant(28)][┬º┬ºconstant(87)][┬º┬ºconstant(88)](x,y,_loc9_[┬º┬ºconstant(61)],_loc9_[┬º┬ºconstant(60)]);
  334.          if(_loc7_ < _loc2_)
  335.          {
  336.             _loc5_ = _loc9_;
  337.             _loc2_ = _loc7_;
  338.          }
  339.          _loc3_ = _loc3_ + 1;
  340.       }
  341.       _loc4_ = _global[┬º┬ºconstant(76)][┬º┬ºconstant(91)][┬º┬ºconstant(15)];
  342.       _loc3_ = 0;
  343.       while(_loc3_ < _loc4_)
  344.       {
  345.          _loc9_ = _global[┬º┬ºconstant(76)][┬º┬ºconstant(77) + _global[┬º┬ºconstant(76)][┬º┬ºconstant(91)][_loc3_]];
  346.          _loc7_ = f[┬º┬ºconstant(28)][┬º┬ºconstant(87)][┬º┬ºconstant(88)](x,y,_loc9_[┬º┬ºconstant(61)],_loc9_[┬º┬ºconstant(60)]);
  347.          if(_loc7_ < _loc2_)
  348.          {
  349.             _loc5_ = _loc9_;
  350.             _loc2_ = _loc7_;
  351.          }
  352.          _loc3_ = _loc3_ + 1;
  353.       }
  354.       return {┬º\┬º\┬ºconstant(92)┬º:_loc5_,┬º\┬º\┬ºconstant(93)┬º:_loc5_[┬º┬ºconstant(94)]};
  355.    };
  356.    _loc2_[┬º┬ºconstant(95)] = function(x, y, ang)
  357.    {
  358.       var _loc2_ = new f.h[┬º┬ºconstant(96)](true);
  359.       var _loc4_ = x + this[┬º┬ºconstant(98)](ang * this[┬º┬ºconstant(97)] / 180) * 28;
  360.       var _loc3_ = y - this[┬º┬ºconstant(99)](ang * this[┬º┬ºconstant(97)] / 180) * 28;
  361.       _loc2_[┬º┬ºconstant(103)]({┬º\┬º\┬ºconstant(61)┬º:_loc4_,┬º\┬º\┬ºconstant(60)┬º:_loc3_,┬º\┬º\┬ºconstant(100)┬º:┬º┬ºconstant(101),┬º\┬º\┬ºconstant(102)┬º:30});
  362.       _loc2_[┬º┬ºconstant(79)]();
  363.       return _loc2_;
  364.    };
  365.    _loc2_[┬º┬ºconstant(104)] = function()
  366.    {
  367.       var _loc3_ = this[┬º┬ºconstant(10)][┬º┬ºconstant(15)];
  368.       var _loc2_ = 0;
  369.       while(_loc2_ < _loc3_)
  370.       {
  371.          this[┬º┬ºconstant(10)][_loc2_][┬º┬ºconstant(105)]();
  372.          _loc2_ = _loc2_ + 1;
  373.       }
  374.       _loc3_ = this[┬º┬ºconstant(8)][┬º┬ºconstant(15)];
  375.       _loc2_ = 0;
  376.       while(_loc2_ < _loc3_)
  377.       {
  378.          this[┬º┬ºconstant(8)][_loc2_][┬º┬ºconstant(106)]();
  379.          _loc2_ = _loc2_ + 1;
  380.       }
  381.    };
  382.    ┬º┬ºpush(┬º┬ºconstant(107)(f.h[┬º┬ºconstant(4)][┬º┬ºconstant(7)],null,1));
  383. }
  384. §§pop();
  385.